#pragma once

#include <math.h>
#include "defs.h"

namespace vivid
{
    class Normal;

	class Vector
	{
	public:
		Vector() :_x(0), _y(0), _z(0) 
		{}
		
		Vector(VFloat aX, VFloat aY, VFloat aZ)
			: _x(aX), _y(aY), _z(aZ) 
		{}

		Vector(Vector const& aVec)
		{
			_x = aVec._x;
			_y = aVec._y;
			_z = aVec._z;
		}

        explicit Vector(Normal const & aNorm);

		Vector & operator = (Vector const &aV);

        VFloat Dot(Vector const & aVec) const;
		Vector Cross(Vector const & aVec) const;
		VFloat Mag() const;
		VFloat MagSq() const;
		Vector Normalize() const;

		Vector operator +(Vector const & aVec2);
		Vector operator -(Vector const & aVec2);
		Vector operator *(VFloat aNum);
		Vector operator /(VFloat aNum);

		VFloat _x;
		VFloat _y;
		VFloat _z;
	};
};